﻿using Microsoft.OpenApi.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XYS.Core.Api.Attributes
{
    /// <summary>
    /// API文档信息特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class OpenApiInfoAttribute : Attribute
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 版本
        /// </summary>
        public string Version { get; set; } = "v1.0.0";

        /// <summary>
        /// API文档信息特性
        /// </summary>
        /// <param name="name">名称</param>
        /// <param name="title">标题</param>
        /// <param name="version">版本</param>
        public OpenApiInfoAttribute(string name, string title, string version)
        {
            Name = name;
            Title = title;
            Version = version;
        }
    }
}
